<?php
/*
 * Created on 22.12.2005
 *
 */

/**
 * attributes:
 * 
 * id: id of html element to show (display = 'block')
 */
class ajax_unhighlightHandler
{
    
    var $name = null;

    function startElement (& $sender, $attrs, $line)
    {
        if (empty($attrs['id']))
            $sender->appendCode('$out->write("alert(\'Attribute id is missing in tag ajax:unhighlight in line '.$line.'!\');");');
        if (empty($attrs['color']))
            $sender->appendCode('$out->write("alert(\'Attribute color is missing in tag ajax:unhighlight in line '.$line.'!\');");');
        if (!$attrs['duration'])
            $sender->appendCode('$out->write("alert(\'Attribute duration is missing in tag ajax:unhighlight in line '.$line.'!\');");');
        else
            $sender->appendCode('$out->write("dojo.lfx.html.unhighlight('.$attrs['id'].', [".'.
                $attrs['color'].'."], ".'.$attrs['duration'].'.", null, function () {");');
    }

    function endElement (& $sender)
    {
        if ($this->effect)
            $sender->appendCode('$out->write("}).play();");');
    }

}

?>